<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let s = new Set();
        let s2 = new Set(['大事', '小事', '小小事', '小小小事', '大事']);
        console.log(s, typeof s);
        console.log(s2); //自动去重
        console.log(s2.size); //元素的个数
        s2.delete('小小小事'); //删除元素
        s2.has('大事'); //检查元素中是否函数参数
        s2.clear(); //清空集合
        console.log(s2);
    </script>
</body>

</html>